#include <iostream>

using namespace std;
int main()
{
    double currentOverlap_left = 0 ;
    double currentOverlap_right = 0 ;

    double targetOverlap_left = 80 ;
    double targetOverlap_right = 80 ;

    double overlap_upper = 5;
    double overlap_lower = -5;

    bool flayState_left[2];
    bool flayState_right[2];

    bool uav3flayState_right[2];
    bool uav3flayState_left[2];

    while(1)
    {
        cin >> currentOverlap_left >> currentOverlap_right;
        if(currentOverlap_left > targetOverlap_left + overlap_upper)
        {
            // 左飞
            flayState_left[0] = true;
            flayState_right[0] = false;
        }
        else if(currentOverlap_left < targetOverlap_left + overlap_lower)
        {
            // 右飞
            flayState_right[0] = true;
            flayState_left[0] = false;
        }
        else
        {
            flayState_left[0] = false;
            flayState_right[0] = false;
        }

        // 飞行命令发生变化 重新发送控制指令
        if(flayState_left[0] != flayState_left[1])
            cout << "flayState_left :  " << flayState_left[0] << endl;
        if(flayState_right[0] != flayState_right[1])
            cout << "flayState_right :  " << flayState_right[0] << endl;

        // 更新flayState_xx[1]
        flayState_left[1] = flayState_left[0];
        flayState_right[1] = flayState_right[0];

        // ****************uav3****************
        if(currentOverlap_right > targetOverlap_right + overlap_upper)
        {
            // 右飞
            uav3flayState_left[0] = false;
            uav3flayState_right[0] = true;
            // cout << " right " << endl;
        }
        else if(currentOverlap_right < targetOverlap_right + overlap_lower)
        {
            // 左飞
            uav3flayState_right[0] = false;
            uav3flayState_left[0] = true;
        }
        else
        {
            uav3flayState_left[0] = false;
            uav3flayState_right[0] = false;
        }

        // 飞行命令发生变化 重新发送控制指令
        if(uav3flayState_left[0] != uav3flayState_left[1])
            cout << "uav3flayState_left :  " << uav3flayState_left[0] << endl;
        if(uav3flayState_right[0] != uav3flayState_right[1])
            cout << "uav3flayState_right :  " << uav3flayState_right[0] << endl;

        // 更新flayState_xx[1]
        uav3flayState_left[1] = uav3flayState_left[0];
        uav3flayState_right[1] = uav3flayState_right[0];
    }

    return 0;

}